/** @namespace app.model.Error */
module.exports = app => {
  const {TEXT, STRING, INTEGER, BOOLEAN} = app.Sequelize;
  const Error = app.model.define('error', {
    md5: {type: STRING, allowNull: false, unique: 'md5'},//错误的md5
    message: {type: TEXT, allowNull: false},//错误内容
    count: {type: INTEGER.UNSIGNED, defaultValue: 1},//错误数量,
    resolve: {type: BOOLEAN, defaultValue: false},//是否已经解决
  }, {
    tableName: 'spider_error',
  });
  Error.associate = () => {
  };

  return Error;
};